package com.imooc.alllearning.domain.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.imooc.alllearning.util.LocalDateTimeStringConverter;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * Excel导出实体对象
 * @Author: crowsjian
 * @Date: 2020/4/2 19:41
 */
@Data
public class UserExportDTO implements Serializable {
    private static final long serialVersionUID = 1730247358879633222L;
    @ExcelProperty(value = "用户名")
    private String username;//用户名
    @ExcelProperty(value = "年龄")
    private Integer age;//年龄
    @ExcelProperty(value = "版本号")
    private Long version;//版本号
    @ExcelProperty(value = "创建时间", converter = LocalDateTimeStringConverter.class)
    @DateTimeFormat(pattern = "yyyy年MM月dd日")
    private Date created;//创建时间
}
